home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADUB.IN_ / oemnadub.inf
INI File  |  1996-07-12  |  29KB  |  783 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     UBPC
  9.     UBPCEOTP
  10. [IRQChoicesUBPC]
  11. IRQ_0 = "2",2
  12. IRQ_1 = "3",3
  13. IRQ_2 = "4",4
  14. IRQ_3 = "5",5
  15. [IRQChoicesUBPCEOTP]
  16. IRQ_0 = "2",2
  17. IRQ_1 = "3",3
  18. IRQ_2 = "4",4
  19. IRQ_3 = "5",5
  20. IRQ_4 = "7",7
  21. IRQ_5 = "12",12
  22. [IRQChoicesUBPS]
  23. IRQ_0 = "2",2
  24. IRQ_1 = "3",3
  25. IRQ_2 = "4",4
  26. IRQ_3 = "5",5
  27. IRQ_4 = "7",7
  28. IRQ_5 = "12",12
  29. [IOBaseAddrChoices]
  30. IOBase_1  = "0x350",848
  31. IOBase_2  = "0x358",856
  32. IOBase_3  = "0x360",864
  33. IOBase_4  = "0x368",872
  34. [MemMappedWndBaseAddrChoicesUBPC]
  35. Add_1 = "0xC0000",786432
  36. Add_2 = "0xC8000",819200
  37. Add_3 = "0xD0000",851968
  38. Add_4 = "0xD8000",884736
  39. [MemMappedWndBaseAddrChoicesUBPCEOTP]
  40. Add_1 = "0x80000",524288
  41. Add_2 = "0x88000",557056
  42. Add_3 = "0x90000",589824
  43. Add_4 = "0x98000",622592
  44. Add_5 = "0xA0000",655360
  45. Add_6 = "0xA8000",688128
  46. Add_7 = "0xB0000",720896
  47. Add_8 = "0xB8000",753664
  48. Add_9 = "0xC0000",786432
  49. Add_10 = "0xC8000",819200
  50. Add_11 = "0xD0000",851968
  51. Add_12 = "0xD8000",884736
  52. Add_13 = "0xE0000",917504
  53. Add_14 = "0xE8000",950272
  54. [MemMappedWndBaseAddrChoicesUBPS]
  55. Add_2 = "0xC8000",819200
  56. Add_4 = "0xD8000",884736
  57. [FileConstants]
  58. UtilityInf      = "UTILITY.INF"
  59. subroutineinf   = "SUBROUTN.INF"
  60. SoftwareType    = "driver"
  61. Exit_Code       = 0
  62. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  63. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  64. Manufacturer    = "Microsoft"
  65. ProductMajorVersion     = "4"
  66. ProductMinorVersion     = "0"
  67. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  68. ProductSoftwareName     = "UB"
  69. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ubnei.sys"
  70. NetRuleSoftwareType     = "ubneiSys ndisDriver ubDriver"
  71. NetRuleSoftwareUse      = $(SoftwareType)
  72. NetRuleSoftwareBindForm = """UbneiSys"" yes no container"
  73. NetRuleSoftwareClass    = {"ubDriver basic"}
  74. NetRuleSoftwareBindable = {"ubDriver ubAdapter non exclusive 100"} 
  75. ProductHardwareName     = "UB"
  76. NetRuleHardwareType     = "ub ubAdapter"
  77. NetRuleHardwareBindForm = " yes yes container"
  78. NetRuleHardwareClass    = {"ubAdapter basic"}
  79. ProductOpSupport     = 134 
  80. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  81. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  82. [GeneralConstants]
  83. from      = ""
  84. to        = ""
  85. ExitCodeOk     = 0
  86. ExitCodeCancel = 1
  87. ExitCodeFatal  = 2
  88. KeyNull         = ""
  89. MAXIMUM_ALLOWED   = 33554432
  90. RegistryErrorIndex = NO_ERROR
  91. KeyProduct      = ""
  92. KeyParameters   = ""
  93. TRUE            = 1
  94. FALSE           = 0
  95. NoTitle            = 0
  96. ExitState   = "Active"
  97. OldVersionExisted = $(FALSE)
  98. DriverPath      = $(!STF_NTPATH)\drivers
  99. [date]
  100.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  101. [Identify]
  102.     read-syms Identification
  103.     set Status     = STATUS_SUCCESSFUL
  104.     set Identifier = $(OptionType)
  105.     set Media      = #("Source Media Descriptions", 1, 1)
  106.     Return $(Status) $(Identifier) $(Media)
  107. [ReturnOptions]
  108.     set Status        = STATUS_FAILED
  109.     set OptionList     = {}
  110.     set OptionTextList = {}
  111.     set LanguageList = ^(LanguagesSupported, 1)
  112.     Ifcontains(i) $($0) in $(LanguageList)
  113.         ifstr(i) $($1) == ""
  114.            goto returnoptions
  115.         endif
  116.         set PlatformList = ^(PlatformsSupported, 1)
  117.         Ifcontains(i) $($1) in $(PlatformList)
  118.            goto returnoptions
  119.         else
  120.            set Status = STATUS_NOTSUPPORTED
  121.            goto finish_ReturnOptions
  122.         endif
  123.     else
  124.         set Status = STATUS_NOLANGUAGE
  125.         goto finish_ReturnOptions
  126.     endif
  127. returnoptions = +
  128.     set OptionList     = ^(Options, 1)
  129.     set OptionTextList = ^(OptionsText$($0), 1)
  130.     set Status         = STATUS_SUCCESSFUL
  131. finish_ReturnOptions = +
  132.     Return $(Status) $(OptionList) $(OptionTextList)
  133. [InstallOption]
  134.     set Option   = $($1)
  135.     set SrcDir   = $($2)
  136.     set AddCopy  = $($3)
  137.     set DoCopy   = $($4)
  138.     set DoConfig = $($5)
  139.     set LanguageList = ^(LanguagesSupported, 1)
  140.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  141.         Return STATUS_NOLANGUAGE
  142.     endif
  143.     Debug-Output "OEMNADUB.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  144.     Debug-Output "OEMNADUB.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  145.     set-subst LF = "\n"
  146.     read-syms GeneralConstants
  147.     read-syms FileConstants
  148.     read-syms DialogConstants$(!STF_LANGUAGE)
  149.     ifstr(i) $(!NTN_Origination) == "NCPA"
  150.         set Continue = $(OK)
  151.     endif
  152.     read-syms FileConstants$(!STF_LANGUAGE)
  153.     detect date
  154.     set-title  $(FunctionTitle)
  155.     set to   = Begin
  156.     set from = Begin
  157.     set CommonStatus = STATUS_SUCCESSFUL
  158.     EndWait
  159. Begin = +
  160.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  161.         set StartLabel = removeadapter
  162.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  163.         set StartLabel = UpgradeSoftware
  164.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  165.         set StartLabel = bindingadapter
  166.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  167.         set CommonStatus = STATUS_REBOOT
  168.         set StartLabel = configureadapter
  169.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  170.             Debug-Output "OEMNADUB.INF: Cannot configure the driver software."
  171.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  172.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  173.                 Debug-Output "OEMNADUB.INF: ShellCode error: cannot get an error string."
  174.                 goto ShellCodeError
  175.             endif
  176.             set Error = $($R0)
  177.             set from = end
  178.             set to = end
  179.             goto nonfatalinfo
  180.         endif
  181.     else
  182.         set StartLabel = installadapter
  183.         set OEM_ABANDON_OPTIONS = {}
  184.         set OEM_ABANDON_SOFTWARE = FALSE
  185.         set OEM_ABANDON_ON = TRUE
  186.     endif
  187.     set IRQValue = *($(IRQList), 4)
  188.     set IOBaseAddrValue = *($(IOBaseAddrList), 4)
  189.     set MemMappedWndAddrValue = *($(MemMappedWndAddrList),~($(MemMappedWndAddrValues),884736))
  190.     set EditTextIn = "1"
  191.     set from = $(fatal)
  192.     set to = $(fatal)
  193.     goto $(StartLabel)
  194. installadapter = +
  195.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  196.     Ifstr $(KeyProduct) != $(KeyNull)
  197.         CloseRegKey $(KeyProduct)
  198.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  199.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  200.                $(ProductVersion)
  201.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  202.                Debug-Output "OEMNADUB.INF: ShellCode error: cannot get an error string."
  203.                goto ShellCodeError
  204.            endif
  205.            goto end
  206.         else
  207.            Shell $(UtilityInf), CardExistedDlg
  208.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  209.                Debug-Output "OEMNADUB.INF: ShellCode error: cannot get an error string."
  210.                goto ShellCodeError
  211.            endif
  212.            ifstr(i) $($R1) != "OK"
  213.                set CommonStatus = STATUS_USERCANCEL
  214.                goto end
  215.            endif
  216.            set OldVersionExisted = $(TRUE)
  217.         endif
  218.     Endif
  219.     Goto adapteroptions
  220. configureadapter = +
  221.     Ifstr(i) $(KeyProduct) == $(KeyNull)
  222.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  223.         Ifstr $(KeyProduct) == $(KeyNull)
  224.             Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  225.             Debug-Output "OEMNADUB.INF: Cannot find component product key"
  226.            Goto fatalregistry
  227.         Endif
  228.     Endif
  229.     Debug-Output "OEMNADUB.INF: INF: Shelling to FindService"
  230.     Shell $(UtilityInf) FindService, $(KeyProduct)
  231.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  232.         Debug-Output "OEMNADUB.INF: INF: FindService shell failure"
  233.         Goto ShellCodeError
  234.     Endif
  235.     Ifstr(i) $($R0) != NO_ERROR
  236.         Debug-Output "OEMNADUB.INF: INF: FindService Shell error: "$($R0)
  237.         Goto fatalregistry
  238.     endif
  239.     set KeyParameters = $($R2)
  240.     CloseRegKey $($R1)
  241.     Ifstr $(KeyParameters) == $(KeyNull)
  242.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  243.         Debug-Output "OEMNADUB.INF: Cannot find component service"
  244.         goto fatalregistry
  245.     endif
  246.     set OldVersionExisted = $(TRUE )
  247.     set ValueName = ""
  248.     set ValueData = ""
  249.     set ValueStr  = ""
  250.     set ValueList = {}
  251.     EnumRegValue $(KeyParameters) ValueList
  252.     ForListDo $(ValueList)
  253.         set ValueItem = $($)
  254.         set ValueName = *($(ValueItem),1)
  255.         set ValueData = *($(ValueItem),4)
  256.         Ifstr(i) $(ValueName) == "InterruptNumber"
  257.             set IRQValueIndex = $(ValueData)
  258.         else-ifstr(i) $(ValueName) == "IoBaseAddress"
  259.             set IOBaseAddrIndex = $(ValueData)
  260.         else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  261.             set MemMappedWndAddrIndex = $(ValueData)
  262.         else-ifstr(i) $(ValueName) == "BusType"
  263.             set BusInterfaceType = $(ValueData)
  264.         else-ifstr(i) $(ValueName) == "BusNumber"
  265.             set BusNumber = $(ValueData)
  266.         endif
  267.     EndForListDo
  268.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  269.     ifstr(i) $(IRQValue) == ""
  270.         set IRQValue = *($(IRQList), 4)
  271.     endif
  272.     set IOBaseAddrValue = *($(IOBaseAddrList), +
  273.          ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  274.     ifstr(i) $(IOBaseAddrValue) == ""
  275.         set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  276.     endif
  277.     set MemMappedWndAddrValue = *($(MemMappedWndAddrList), +
  278.          ~($(MemMappedWndAddrValues),$(MemMappedWndAddrIndex)))
  279.     ifstr(i) $(MemMappedWndAddrValue) == ""
  280.         set MemMappedWndAddrValue = *($(MemMappedWndAddrList),~($(MemMappedWndAddrValue),884736))
  281.     endif
  282. adapteroptions = +
  283.     set from = adapteroptions
  284.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  285.         ifstr(i) $(!AutoNetInterfaceType) != ""
  286.             set BusInterfaceType = $(!AutoNetInterfaceType)
  287.         else
  288.             set BusInterfaceType = 1    
  289.         endif
  290.         ifstr(i) $(!AutoNetBusNumber) != ""
  291.             set BusNumber = $(!AutoNetBusNumber)
  292.         else
  293.             set BusNumber = 0
  294.         endif
  295.         goto nextstep
  296.     endif
  297.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  298.     ui start "InputDlg"
  299.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  300.         set IRQValueIndex = $(Combo1Out)
  301.         set IOBaseAddrIndex = $(Combo2Out)
  302.         set MemMappedWndAddrIndex = $(Combo3Out)
  303.         ui pop 1
  304.     else-ifstr(i) $(DLGEVENT) == "BACK"
  305.         set CommonStatus = STATUS_USERCANCEL
  306.         Debug-Output "OEMNADUB.INF: Action: exit. Bye."
  307.         ui pop 1
  308.         goto end
  309.     else
  310.         ui pop 1
  311.         Debug-Output "OEMNADUB.INF: Action: unknown. Bye."
  312.         goto end
  313.     endif
  314.     ifstr(i) $(!STF_NCDETINFO) == {}
  315.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  316.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  317.             Debug-Output "ShellCode error."
  318.             goto ShellCodeError
  319.         endif
  320.         set BusInterfaceType = $($R1)
  321.         set BusNumber = $($R2)
  322.     else
  323.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  324.         set BusNumber = *($(!STF_NCDETINFO),6)
  325.     endif
  326. nextstep = +
  327.     ifint $(OldVersionExisted) == $(TRUE)
  328.         ifstr(i) $(!NTN_InstallMode) == configure
  329.             goto writeparameters
  330.         endif
  331.     endif
  332.     StartWait
  333.     Ifint $(OldVersionExisted) != $(FALSE)
  334.         Goto installhardware
  335.     Endif
  336.     ifstr(i) $(!NTN_InstallMode) == "install"
  337.        Ifstr(i) $(DoCopy) == "YES"
  338.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  339.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  340.               Goto ShellCodeError
  341.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  342.               Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  343.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  344.                   goto ShellCodeError
  345.               endif
  346.               set Error = $($R0)
  347.               Goto fatal
  348.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  349.               Goto successful
  350.           Endif
  351.           Set SrcDir = $($R1)
  352.        Endif
  353.        install "Install-Option"
  354.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  355.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  356.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  357.                goto ShellCodeError
  358.            endif
  359.            set Error = $($R0)
  360.            goto fatal
  361.        endif
  362.     endif
  363.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  364.         $(ProductSoftwareName), +
  365.         $(ProductSoftwareName), +
  366.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  367.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  368.         $(NetEventDLL), ""
  369.     Set OEM_ABANDON_SOFTWARE = TRUE
  370.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  371.         Debug-Output "OEMNADUB.INF: ShellCode error"
  372.         goto ShellCodeError
  373.     endif
  374.     set RegistryErrorIndex = $($R0)
  375.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  376.         EndWait
  377.         Debug-Output "OEMNADUB.INF: Registry error: add software components"
  378.         CloseRegKey $($R1)
  379.         CloseRegKey $($R2)
  380.         CloseRegKey $($R3)
  381.         CloseRegKey $($R4)
  382.         CloseRegKey $($R5)
  383.         goto fatalregistry
  384.     endif
  385.     Set SoftProductKey  = $($R1)
  386.     Set SoftNetRuleKey  = $($R2)
  387.     Set SoftServiceKey  = $($R3)
  388.     Set SoftParameterKey        = $($R4)
  389.     Set SoftLinkageKey  = $($R5)
  390.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  391.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  392.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  393.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  394.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  395.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  396.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  397.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  398.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  399.             Debug-Output "OEMNADUB.INF: ShellCode error."
  400.             goto ShellCodeError
  401.     endif
  402.     set RegistryErrorIndex = $($R0)
  403.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  404.             EndWait
  405.             Debug-Output "OEMNADUB.INF: Registry error: add value list for software product."
  406.             CloseRegKey $(SoftProductKey)
  407.             CloseRegKey $(SoftNetRuleKey)
  408.             CloseRegKey $(SoftServiceKey)
  409.             CloseRegKey $(SoftParameterKey)
  410.         CloseRegKey $(SoftLinkageKey)
  411.         goto fatalregistry
  412.     endif
  413.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  414.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  415.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  416.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  417.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  418.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  419.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  420.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  421.             Debug-Output "OEMNADUB.INF: ShellCode error."
  422.             goto ShellCodeError
  423.     endif
  424.     Set RegistryErrorIndex = $($R0)
  425.     CloseRegKey $(SoftProductKey)
  426.     CloseRegKey $(SoftNetRuleKey)
  427.     CloseRegKey $(SoftServiceKey)
  428.     CloseRegKey $(SoftParameterKey)
  429.     CloseRegKey $(SoftLinkageKey)
  430.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  431.         EndWait
  432.         Debug-Output "OEMNADUB.INF: Registry error: add value list."
  433.         goto fatalregistry
  434.     endif
  435. installhardware =+
  436.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  437.     ifint $($R4) != -1
  438.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  439.     endif
  440.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  441.         Debug-Output "OEMNADUB.INF: Cannot add hardware component"
  442.         goto ShellCodeError
  443.     endif
  444.     set RegistryErrorIndex = $($R0)
  445.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  446.         EndWait
  447.         Debug-Output "OEMNADUB.INF: Registry error: add hardware component"
  448.         CloseRegKey $($R1)
  449.         CloseRegKey $($R2)
  450.         CloseRegKey $($R3)
  451.         goto fatalregistry
  452.     endif
  453.     set KeyProduct = $($R1)
  454.     set KeyAdapterRules = $($R2)
  455.     set KeyParameters = $($R3)
  456.     set AdapterNumber = $($R4)
  457.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  458.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  459.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  460.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  461.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  462.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  463.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  464.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  465.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  466.         Debug-Output "OEMNADUB.INF: ShellCode error"
  467.         goto ShellCodeError
  468.     endif
  469.     CloseRegKey $(KeyProduct)
  470.     Set KeyProduct = ""
  471.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  472.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  473.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  474.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  475.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  476.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  477.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  478.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  479.         Debug-Output "OEMNADUB.INF: ShellCode error."
  480.         goto ShellCodeError
  481.     endif
  482.     CloseRegKey $(KeyAdapterRules)
  483.     Set RegistryErrorIndex = $($R0)
  484.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  485.         EndWait
  486.         Debug-Output "OEMNADUB.INF: Registry error: add value list."
  487.         CloseRegKey $(KeyParameters)
  488.         goto fatalregistry
  489.     Endif
  490. writeparameters = +
  491.     Ifstr(i) $(KeyParameters) == $(KeyNull)
  492.         Debug-Output "OEMNADUB.INF:  *** KeyParameters is NULL at writeparameters"
  493.     Endif
  494.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  495.     set IOBaseAddrValue = *($(IOBaseAddrValues), +
  496.          ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  497.     set MemMappedWndAddrValue = *($(MemMappedWndAddrValues), +
  498.          ~($(MemMappedWndAddrList),$(MemMappedWndAddrIndex)))
  499.     ifstr(i) $(Option) == "UBPC"
  500.         set CardType = "2"
  501.     else-ifstr(i) $(Option) == "UBPCEOTP"
  502.         set CardType = "4"
  503.     else
  504.         set CardType = "3"
  505.     endif
  506.     set NewValueList = {+
  507.                         {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  508.                         {CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
  509.                         {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  510.                         {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  511.                         {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  512.                         {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)},+
  513.                         {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemMappedWndAddrValue)}}
  514.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  515.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  516.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  517.     endif
  518.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  519.         Debug-Output "OEMNADUB.INF: ShellCode error."
  520.         goto ShellCodeError
  521.     endif
  522.     Set RegistryErrorIndex = $($R0)
  523.     CloseRegKey $(KeyParameters)
  524.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  525.         Debug-Output "OEMNADUB.INF: Registry error: Add value list"
  526.         goto fatalregistry
  527.     Endif
  528.     EndWait
  529.     goto successful
  530. bindingadapter =+
  531.     set Error = "Binding: Sorry, not yet implemented."
  532.     goto fatal
  533. removeadapter = +
  534.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  535.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  536.             $(ProductSoftwareName)
  537.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  538.             Debug-Output "OEMNADUB.INF: ShellCode error"
  539.             goto ShellCodeError
  540.         endif
  541.         set RegistryErrorIndex = $($R0)
  542.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  543.             goto fatalregistry
  544.         endif
  545.     else
  546.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  547.             $(ProductSoftwareName), $(!NTN_RegBase)
  548.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  549.             Debug-Output "OEMNADUB.INF: ShellCode error"
  550.             goto ShellCodeError
  551.         endif
  552.         set RegistryErrorIndex = $($R0)
  553.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  554.             goto fatalregistry
  555.         endif
  556.     endif
  557.     goto end
  558. UpgradeSoftware = +
  559.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  560.     Ifstr $(KeyProduct) != $(KeyNull)
  561.         install "Install-Update"
  562.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  563.             goto fatal
  564.         endif
  565.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  566.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  567.         CloseRegKey $(KeyProduct)
  568.     else
  569.         goto fatalregistry
  570.     endif
  571.     set iSearch = 1
  572. nextnetcard = +
  573.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  574.     set KeyNetcard = $($R0)
  575.     set iSearch = $($R1)
  576.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  577.     Ifstr $(KeyNetcard) != $(KeyNull)
  578.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  579.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  580.         CloseRegKey $(KeyNetcard)
  581.         goto nextnetcard
  582.     Endif
  583.     goto end
  584. successful = +
  585.     goto end
  586. abandon = +
  587.     ForListDo $(OEM_ABANDON_OPTIONS)
  588.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  589.             $(ProductSoftwareName), $($)
  590.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.             Debug-Output "OEMNADUB.INF: ShellCode error"
  592.             goto ShellCodeError
  593.         endif
  594.         set RegistryErrorIndex = $($R0)
  595.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  596.             goto fatalregistry
  597.         endif
  598.     EndForListDo
  599.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  600.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  601.             $(ProductSoftwareName), FALSE
  602.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  603.             Debug-Output "OEMNADUB.INF: ShellCode error"
  604.             goto ShellCodeError
  605.         endif
  606.         set RegistryErrorIndex = $($R0)
  607.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  608.             goto fatalregistry
  609.         endif
  610.     endif
  611.     goto end
  612. warning = +
  613.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  614.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  615.         goto ShellCodeError
  616.     endif
  617.     ifstr(i) $($R1) == "OK"
  618.         goto $(to)
  619.     else-ifstr(i) $($R1) == "CANCEL"
  620.         goto $(from)
  621.     else
  622.         goto "end"
  623.     endif
  624. nonfatalinfo = +
  625.     Set CommonStatus = STATUS_USERCANCEL
  626.     Set Severity = STATUS
  627.     goto nonfatalmsg
  628. nonfatal = +
  629.     Set Severity = NONFATAL
  630.     goto nonfatalmsg
  631. nonfatalmsg = +
  632.     ifstr(i) $(Error) == ""
  633.         Set Severity = NONFATAL
  634.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  635.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  636.             goto ShellCodeError
  637.         endif
  638.         set Error = $($R0)
  639.     endif
  640.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  641.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642.         goto ShellCodeError
  643.     endif
  644.     ifstr(i) $($R1) == "OK"
  645.         goto $(from)
  646.     else
  647.         goto "end"
  648.     endif
  649. fatalregistry = +
  650.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  651.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  652.         goto ShellCodeError
  653.     endif
  654.     set Error = $($R0)
  655.     goto fatal
  656. fatal = +
  657.     ifstr(i) $(Error) == ""
  658.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  659.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.             goto ShellCodeError
  661.         endif
  662.         set Error = $($R0)
  663.     endif
  664.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  665.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666.         goto ShellCodeError
  667.     endif
  668.     goto setfailed
  669. ShellCodeError = +
  670.     set DlgType      = "MessageBox"
  671.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  672.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  673.     set STF_MB_TYPE  = 1
  674.     set STF_MB_ICON  = 3
  675.     set STF_MB_DEF   = 1
  676.     ui start "Error Message"
  677.     goto setfailed
  678. setfailed = +
  679.     set CommonStatus = STATUS_FAILED
  680.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  681.         set OEM_ABANDON_ON = FALSE
  682.         goto abandon
  683.     endif
  684.     goto end
  685. end = +
  686.     goto term
  687. term = +
  688.     Return $(CommonStatus)
  689. [Install-Option]
  690.     set STF_VITAL = ""
  691.     ifstr(i) $(AddCopy) == "YES"
  692.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  693.     endif
  694.     Debug-Output "OEMNADUB.INF: [Install-Option] DoCopy = "$(DoCopy)
  695.     ifstr(i) $(DoCopy) == "YES"
  696.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  697.        CopyFilesInCopyList
  698.     endif
  699.     ifstr(i) $(DoConfig) == "YES"
  700.     endif
  701.     Exit
  702. [Install-Update]
  703.    set STF_VITAL        = ""
  704.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  705.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  706.    exit
  707. [Source Media Descriptions]
  708.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  709. [Signature]
  710.     FileType = MICROSOFT_FILE
  711. [GetSignature]
  712.     read-syms Signature
  713.     return $(FileType)
  714. [ProductType]
  715. STF_PRODUCT  = LanmanNT
  716. STF_PLATFORM = I386
  717. [Files-Inf]
  718. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  719. [Files-UBPC]
  720. 1,UBNEI.BIN , SIZE=999
  721. 1,UBNEI.SYS , SIZE=999
  722. [Files-UBPCEOTP]
  723. 1,UBNEI.BIN , SIZE=999
  724. 1,UBNEI.SYS , SIZE=999
  725. [Files-UBPS]
  726. 1,UBNEI.BIN , SIZE=999
  727. 1,UBNEI.SYS , SIZE=999
  728. [LanguagesSupported]
  729.     ENG
  730. [OptionsTextENG]
  731.     UBPC     = "Ungermann-Bass Ethernet NIUpc Adapter"
  732.     UBPCEOTP = "Ungermann-Bass Ethernet NIUpc/EOTP Adapter"
  733. [FileConstantsENG]
  734. ProCaption   = "Windows NT Setup"
  735. ProCancel    = "Cancel"
  736. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  737.                "Are you sure you want to cancel copying files?"
  738. ProCancelCap = "Network Setup Message"
  739. ProText1     = "Copying:"
  740. ProText2     = "To:"
  741. FunctionTitle   = "Ungermann-Bass Adapter Card Setup"
  742. ProductSoftwareDescription      = "Ungermann-Bass Adapter Driver"
  743. ProductHardwareUBPCDescription          = "Ungermann-Bass Ethernet NIUpc Adapter"
  744. ProductHardwareUBPCEOTPDescription      = "Ungermann-Bass Ethernet NIUpc/EOTP Adapter"
  745. ProductHardwareUBPSDescription          = "Ungermann-Bass Ethernet NIUps Adapter"
  746. ProductSoftwareTitle    = "Ungermann-Bass Driver"
  747. ProductHardwareUBPCTitle        = "Ungermann-Bass Ethernet NIUpc Adapter"
  748. ProductHardwareUBPCEOTPTitle    = "Ungermann-Bass Ethernet NIUpc/EOTP Adapter"
  749. ProductHardwareUBPSTitle        = "Ungermann-Bass Ethernet NIUps Adapter"
  750. IRQList  = ^(IRQChoices$(Option), 1)
  751. IRQValues = ^(IRQChoices$(Option), 2)
  752. IOBaseAddrList = ^(IOBaseAddrChoices, 1)
  753. IOBaseAddrValues = ^(IOBaseAddrChoices, 2)
  754. MemMappedWndAddrList = ^(MemMappedWndBaseAddrChoices$(Option), 1)
  755. MemMappedWndAddrValues = ^(MemMappedWndBaseAddrChoices$(Option), 2)
  756. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  757. ShellCodeErrorText      = "Shell Code Error."
  758. [DialogConstantsENG]
  759. Help        = "&Help"
  760. Exit        = "Cancel"
  761. OK          = "OK"
  762. HelpContext = ""
  763. Continue    = "Continue"
  764. Cancel      = "Cancel"
  765. [FileDependentDlgENG]
  766. Label1 = "&Interrupt Number:"
  767. Label2 = "I/O &Port Base Addr:"
  768. Label3 = "&Memory Address:"
  769. DlgType = "Combination"
  770. DlgTemplate = "UBNDIS"
  771. Caption = $(FunctionTitle)
  772. Combo1List = $(IRQList)
  773. Combo1Out  = $(IRQValue)
  774. Combo2List = $(IOBaseAddrList)
  775. Combo2Out  = $(IOBaseAddrValue)
  776. Combo3List = $(MemMappedWndAddrList)
  777. Combo3Out  = $(MemMappedWndAddrValue)
  778. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  779. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  780. EditTextLim = ""
  781. CBOptionsGreyed = {}
  782. HelpContext = $(!IDH_DB_OEMNADUB_INS)
  783.